<template>
	<view class="zy-ph-100" style="width: 100vw;">
		<view style="background: #181B1C; border: 1rpx solid #707070; border-radius: 18rpx; padding: 50rpx 30rpx;">
			<view class="zy-text-white-lg-bold" style="font-size: 42rpx; font-weight: bold;">{{title}}</view>
			<view class="zy-text-white-lg-bold zy-mt" style="min-height: 100rpx;">{{content}}</view>
			<view class="zy-row zy-mt-50">
				<zy-button class="zy-flex zy-mr-lg" :content="cancelText" hollow @click='cancel' v-if="!hideCancel"></zy-button>
				<zy-button class="zy-flex" :content="confirmText" @click='ok'></zy-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "zy-popup",
		data() {
			return {
			};
		},
		props: {
			title: {
				type: String,
				default(){
					return '温馨提示'
				}
			},
			content: {
				type: String,
				default(){
					return ''
				}
			},
			cancelText: {
				type: String,
				default(){
					return '取消'
				}
			},
			confirmText: {
				type: String,
				default(){
					return '确认'
				}
			},
			hideCancel:{
				type:Boolean,
				default:()=>false
			}
		},
		methods: {
			cancel(){
				this.$emit('cancel')
			},
			ok(){
				console.log('confirm');
				this.$emit('ok')
			},
		}
	}
</script>

<style lang="scss" scoped>
</style>